<?php echo $left ?>
<link rel="stylesheet" type="text/css" href="<?=base_url()?>public/uploadify/uploadify.css">
<script type="text/javascript" src="<?=base_url()?>public/uploadify/jquery.uploadify.js"></script>
<script>
$( document ).ready(function() {
	$.ajaxSetup({
		cache: false
	});
	$( '.sidebar' ).simpleSidebar({
		settings: {
			opener: '#open-sb',
			wrapper: '.wrapper',
			animation: {
				duration:0,
				easing: 'easeOutQuint'
			}
		},
		sidebar: {
			align: 'left',
			width: 214,
			closingLinks: 'a',
		}
	});
	$("td.chakan>a").each(function(){
		$(this).click(function(){
			$(this).siblings(".tishi").fadeIn();
		});
	});
	$(".tishi .btn >input").each(function(){
		$(this).click(function(){
			$(this).parent().parent().hide();
		})
	});
	$("a#gbck").click(function(){
		$(".tan_link2").removeClass("tan_hovers2");
		})	
	$("a#tcxt").click(function(){
		$("div#tcxt").addClass("tan_hovers");
		})	
	$("a#tcxt2").click(function(){
		$("div#tcxt2").addClass("tan_hovers");
		})	
	$("a.xzts_hx").click(function(){
		$(".tian").show();
		})		
		
		
});
</script>
<style>
	.tishi{
		width:301px;left:50%;top:20%;position:fixed;background-color:#fff;transform:translateX(-150px);display:none
	}
	.tishi>p{
		line-height:54px;
		font-size:17px;
	}
	.tishi .btn input{
		width:120px;
		height:30px;
		color:#fff;
		background-color:#4fa602;
	}
	.tan_link2{
		position:fixed;
		top:200px;
		left:50%;
		margin-left:-185px;
	}
	.liebiao th:first-child,.liebiao tr>td:first-child{
		width:69px;
		padding:5px 10px;
	}
	.liebiao th:nth-child(2),.liebiao tr>td:nth-child(2){
		width:69px;
		padding:5px 10px;
	}
	.liebiao th:nth-child(6),.liebiao tr>td:nth-child(6){
		width:69px;
		padding:5px 10px;
	}
	.liebiao{
		width:900px;
		box-sizing:border-box;
		margin:0px;
	}
	.moneyCount{
		width:90px;
		
	}
	#gundong{
		padding:0px 10px;margin:0 15px;box-sizing:border-box;overflow-x:scroll;
	}
	#gundong:horizontal{
		height:5px ;background-color:#ddd;
	}
	.menu{
		z-index:2;
		background-color:#000 !important;
		color:#fff;
	}
	.tishi1{
		display:none;
		position: absolute;
		width: 290px;
		left: 50%;
		margin-left: -105px;
		top: 30%;
		background-color: #f5f5f5;
		color: #525252;
		box-shadow: -5px 5px 10px 1px rgba( 11, 2, 5, 0.3 );
	}
	.tishi1 h6{
		color: #1d3e00;
		text-align: center;
		line-height: 50px;
		font-size: 17px;
	}
	.tishi1 .btn1 input{
		width: 113px;
		height: 40px;
		background-image: url(<?=base_url()?>public/img/btn3.png);
		background-size: 100% 100%;
		background-repeat: no-repeat;
		color: white;
		margin-right: 15px;
		margin-left: 15px;
		margin-top: 25px;
		margin-bottom: 25px;
		line-height: 24px;
	}
	/*文件上传*/
	#code{
		display:none;
		width: 300px;
		height: 227px;
		border-radius: 10px;
		background-color: #fff;
		padding: 10px;
		position: absolute;
		display: none;
		left: 45%;
		z-index: 1002;
	}
	#closebt {
		float: right;
	}
	#closebt img {
		width: 12px;
		border-radius: 6px;
		border: 1px solid #efefef;
	}
	.goodtxt {
		text-align: center;
	}
	#file_upload {
		width: 172px !important;
		height: 40px !important;
	}
	.close1 {
		width: 300px;
		height: 35px;
	}
	.uploadify {
		position: relative;
		margin-bottom: 1em;
	}
	#file_upload-button{
		background:url("<?=base_url()?>public/img/commitImg1.jpg");
		width:172px !important;
		height:40px !important;
		line-height:40px !important;
	}
	#file_upload-queue{
		width:250px;
		height:10px;
		background-color:#e6e6e6;
		border-radius:10px;
		position:realtive;
	}
	#file_upload_queue>i{
		position:absolute;
		top:0px;
		left:0px;
		width:100%;
		height:100%;
		border-radius:5px;
		background-color:#005886;
	}

	#file_upload-button {
		cursor:pointer;
		background: url(public/img/commitImg1.jpg);
		width: 172px !important;
		height: 40px !important;
		line-height: 40px !important;
	}
	.goodtxt p {
		height: 30px;
		line-height: 30px;
		font-size: 16px;
		color: #000;
		font-weight: 600;
	}
	#btn_img{
		width: 170px;
		height: 40px;
		margin-top: 5px;
		background: url(<?php echo base_url()?>public/img/commitImg2.jpg) no-repeat center center / 100% 100%;
		font-size: 14px;
		position: relative;
		color: #000;
		font-weight: bold;
	}
</style>
<script type="text/javascript" src="<?=base_url()?>public/uploadify/jquery.uploadify.js"></script>
<div class="clear"></div>
<div  class="w640">
      <div class="yd3 pt50"><span class="ydtxt">公益收益中心</span> - 提供公益帮助</div>
      <?php echo form_open('mobile/offer_help/info_post',array('id'=>'myform')) ?>
	  <table cellpadding="0" cellspacing="0" class="biao">
	     <tr>
		    <td class="w140x pr10" style='position:relative;top:-30px;'>公益币余额</td>
            <td class="txtts"><input readonly="readonly" type="text" style="background-color:#f5fed9;height:35px;line-height:35px;font-size:20px;transform:translateY(11px)" value="<?php echo $user['public_money'] ?>"><div class="clear"></div>
			   <p class="txttx">您当前公益级别：<?php echo $score_level['title']; ?>        日回报<span class="red"><?php echo $score_level['lv_day_rate']; ?>%</span><br />
			     打款后会获得首日<span class="red"><?php echo $score_level['first_day_rate']; ?>%</span>，每日依次递增<span class="red">0.5%</span>的日回报<br />
		      </p></td>
		 </tr>
		 
		 <tr>
		    <td class="w140x pr10">申请合作金额</td>
			<td>
			<select class="input1" type="text" id="money" name="money" value="" maxlength='5'>
				<option value="2000">2000</option>
				<option value="4000">4000</option>
				<option value="6000">6000</option>
				<option value="8000">8000</option>
				<option value="10000">10000</option>
			</select>
		   </td>
		 </tr>
		 <tr>
		    <td colspan="2" >
				<a id='zcxy' style='margin-left:150px;color:#1d3e00;cursor:pointer;display:block;;margin-top:15px;'>平台服务条款</a>
			<div class="asa" style='left:0%;top:24%;z-index:500; box-shadow:1px 3px 5px 1px rgba(11, 2, 5, 0.3); position:absolute;width:100%;height:440px;padding:25px 52px;background:#edf8c5;color:#3e4d0a;line-height:40px;text-align:center;display:none;box-sizing:border-box;'>
			<span style='font-size:18px;font-weight:bolod;'>平台服务条款</span>
			<br />
			<p style='word-break:break-all;' >&nbsp;&nbsp;&nbsp;得道天合公益扶农平台是以公益为目的的开放平台本平台，是为了让参与者通过资金流动让所需资助者获取帮助，让赞助者获取利益，真正达到资金传递，互利互惠。
			平台只收取公益币费用作为参与使用，每枚十元。注册本平台会员即有权利参与。<br/>&nbsp;&nbsp;&nbsp;注：投资有风险，请用非关键资金参与。我已完全了解所有条款与风险。并自愿参与，遵守平台条款和制度。</p>
			<label style="display:block;"><input type='checkbox' id="jkcheck" checked='checked' style='transform:translateY(3px);float:none;;' />我同意</label>
			<div style='width:20%;margin:0 auto;height:30px;line-height:30px;border-radius:10%;background:#254e01; margin-bottom:20px; color:white;position:relative;' class='js-btn'>点击关闭</div>
			</div>
		        <div class="inp360" style="margin-top:15px;"><a href="#" class="inputt" id="inputt" onclick="">确认申请</a></div></td>
		 </tr>
  </table>
  </form>
      <div class="dx"></div>
	  <div class="yd2"><span class="ydtxt">公益收益中心</span>  -  公益等待期/公益合作期</div>
	  <div id="gundong">
		<table cellpadding="0" cellspacing="0" class="liebiao" >
	     <tr>
		    <!--<th>公<br />益<br />编<br />号</th>-->
            <th>申<br />请<br />日<br />期</th>
			<th>匹<br />配<br /> 时<br />间</th>
			<th class="moneyCount">金<br />额</th>
			<th class='dayCount'>天<br />数</th>
			<th>回<br />报</th>
			<th>积<br />分<br />倒<br />计<br />时</th>
			<th>剩<br />余<br />打<br />款<br />时<br />间</th>
			<th>收<br />益<br />人<br />信<br />息</th>
			<th>合<br />作<br />天<br />数</th>
			<th>操<br />作</th>
			<th>上<br />传<br />打<br />款<br />图<br />片</th>
	     </tr>
		  <?php $ci_obj = & get_instance();  ?>
		  <?php foreach($order_list as $key => $log): ?>
			  <tr>

				  <?php
				  $out_rate = 0;
				  if($log['out_day_num']!=0){
					  $user_lv = $ci_obj->common->get_user_level_info($log['user_lv']);
					  $out_rate = array_sum(range($user_lv['first_day_rate'],($user_lv['first_day_rate'] + ($log['out_day_num'] - 1)*0.5),0.5));

				  }
				  ?>

				
				  <td class="number"><?php echo  date('Y-m-d H:i:s',$log['sq_time'])?></td>
				  <td class="number"><?php echo  date('Y-m-d H:i:s',$log['hz_time'])?></td>
				  <td><?php echo $log['money']?></td>
				  <td><?php echo $log['day_num']+ ($log['out_day_num'] ? $log['out_day_num'] : 0)?></td>
				  <td><?php echo ($log['day_num']*$log['money'])/100 + ($out_rate ? ($out_rate *$log['money'])/100 :0)?></td>
				  <td class="green">
					  <?php if($log['shoukuan'] == 0 ):?>
						  <?php  $five_hours = 18000 - (time() - $log['hz_time']); ?>
						  <?php if($five_hours > 0): ?>
							  <span class="settime" endTime="<?php echo $five_hours ?>">

                                    </span>
						  <?php else: ?>
							  过期
						  <?php endif; ?>
					  <?php endif;  ?>
				  </td>
				  <td>
					  <?php if($log['shoukuan'] == 0 ):?>
						  <?php $sy_time = 86400  - (time() - $log['hz_time']);?>
						  <?php  if($sy_time > 0): ?>
							  <span class="settime" endTime="<?php echo $sy_time ?>"></span>
						  <?php else: ?>
							  过期
						  <?php endif; ?>
					  <?php elseif($log['dakuan'] == 1):  ?>
						  交易完成
					  <?php else:  ?>
						  已拒绝
					  <?php endif; ?>
				  </td>
				  <td class="chakan" style='color:blue;width:20px'>
					  <span class="btn_chakan" data-json='<?php echo json_encode($log); ?>'><a href="javascript:;" style="color:blue">查看</a></span>
				  </td>

				  <td class="green xuanze" style="position:relative;">
					  <?php if($log['out_day_num'] == 0): ?>
						  请选择
						  <ul class="menu" olid = "<?php echo $log['id'] ?>" style='top: 100%;left:0px;position: absolute; background-color: #ffffff;width: 80px;display:none'>
							  <li>1天</li>
							  <li>2天</li>
							  <li>3天</li>
							  <li>4天</li>
							  <li>5天</li>
						  </ul>
					  <?php else: ?>
						  <?php if($log['shoukuan'] == 0): ?>
							 <?php echo $log['out_day_num'].'天'  ?>
						  <?php else: ?>
							  <?php $sy_out_time = ($log['out_day_num']* 86400) - (time()-$log['shoukuan_time']);?>
							  <?php if($sy_out_time > 0): ?>
								  <span class="settime" endTime="<?php echo $sy_out_time ?>"></span>
							  <?php else: ?>
								  已出场
							  <?php endif; ?>
						  <?php endif; ?>
					  <?php endif; ?>
				  </td>
				  <td class="number"  style='line-height:20px;width:90px;'>
					  <?php if($log['dakuan'] == 0): ?>
						  <b class="<?php if($log['out_day_num'] != 0): ?>dakuan<?php else:?>dakuan1<?php endif; ?>" >
							  <a style='color:blue;cursor:pointer;' <?php if($log['out_day_num'] != 0): ?> href="<?php echo site_url('offer_help/change_dakuan_type/1/'.$log['id'].'/'. urlencode($log['up_account']) ) ?>"<?php else:?> href="javascript:void(0);" onClick="dotishi();" <?php endif; ?>>确认打款</a>
						  </b>
						  <br>
						  <b style='color:red;cursor:pointer;' class='buda'>
							  <b href="<?php echo site_url('offer_help/change_dakuan_type/2/'.$log['id']) ?>">拒绝打款</b>
						  </b>
					  <?php else:?>
						  <?php echo $dakuan_type[$log['dakuan']] ?>
					  <?php endif; ?>
				  </td>
				  <?php if(empty($log['img_url'])): ?>
					  <td class="photo" style="width:90px;" order_id="<?php echo $log['id'] ?>">
						  <span style="cursor:pointer;">文件上传</span>
						  <input type="file" style="display:none">
					  </td>
				  <?php else: ?>
					  <td>
						  <a style='color:blue;' href="<?php echo base_url().'uploads/'.$log['img_url'] ?>" target="_blank">查看</a>
					  </td>
				  <?php endif; ?>
			  </tr>
		  <?php endforeach; ?>
  </table>
	  </div>
	  
</div>
<div id="tcxt" class="tan_link">
<span class="tan_links">您确定要退出平台吗？</span><div class="tanann"><input type="button"  class="tanbt left" value="是"/><input type="button"  class="tanbt right" value="否" /></div></div>
<div id="tcxt2" class="tan_link">
<span class="tan_links">请您选择钱包</span><div class="tanann"><input type="button"  class="taninp"  value="是"/></div>
</div>
<div id="cha" class="tan_link2">
  <table  class="cbiao" cellspacing="0" cellpadding="0">
    <tr>
      <td class="w100 pr10">公益账号：</td>
	  <td width="434" class="user_account"></td>
    </tr>
	<tr>
      <td class="w100 pr10">姓名：</td>
	  <td width="434" class="user_name"></td>
    </tr>
	<tr>
	  <td class="w100 pr10">电话：</td>
	  <td class="mobile"></td>
    </tr>
	<tr>
	  <td class="w100 pr10">支付宝号：</td>
	  <td class="zfb_account"></td>
    </tr>
	<tr>
	  <td class="w100 pr10">微信号：</td>
	  <td class="wx_id"></td>
    </tr>
	<tr>
	  <td class="w100">银行账号：</td>
	  <td class="bank_card"></td>
    </tr>
	<tr>
	  <td class="w100">匹配金额：</td>
	  <td ><span class="w100 pr10"class="money"></span></td>
    </tr>
	<tr>
	  <td class="w100">匹配时间：</td>
	  <td class="hz_time"></td>
    </tr>
	<tr>
	  <td class="w100">推荐人姓名：</td>
	  <td class="up_user_name"></td>
    </tr>
	<tr>
	  <td class="w100">电话：</td>
	  <td class="up_mobile"></td>
    </tr>
	<tr>
	  <td colspan="2"><a href="javascript:;" class="taninp pb20" id="gbck">关闭</a></td>
    </tr>
  </table>
</div>
<div id="msg_box" class="tishi1">
	<h6>是否确认打款</h6>
	<p class="btn1">
		<input id="btn_sk_on" type="button" value="是" name="是">
		<input id="btn_sk_off" type="button" value="否" name="否">
	</p>
</div>
	<div id="code" style="position: absolute; top: 305px; left: 524px; ">
		<div class="close1">

			<b class="tishi-js" style="color:red;margin-left:112px;mragin-top:50px;display:block;width:88px;font-size:16px;"></b>
			<a href="javascript:void(0)" id="closebt"><img src="/ddth/public/img/close.gif"></a>
		</div>
		<div class="goodtxt">
			<center>
				<form action="/ddth/offer_help/update_img" id="imgform" method="post" accept-charset="utf-8">
					<div id="file_upload" class="uploadify" style="height: 30px; width: 120px;"><object id="SWFUpload_1" type="application/x-shockwave-flash" data="/ddth/public/uploadify/uploadify.swf?preventswfcaching=1475170771514" width="120" height="30" class="swfupload" style="position: absolute; z-index: 1;"><param name="wmode" value="transparent"><param name="movie" value="/ddth/public/uploadify/uploadify.swf?preventswfcaching=1475170771514"><param name="quality" value="high"><param name="menu" value="false"><param name="allowScriptAccess" value="always"><param name="flashvars" value="movieName=SWFUpload_1&amp;uploadURL=%2Fddth%2Foffer_help%2Fimg_upload&amp;useQueryString=false&amp;requeueOnError=false&amp;httpSuccess=&amp;assumeSuccessTimeout=30&amp;params=&amp;filePostName=userfile&amp;fileTypes=*.*&amp;fileTypesDescription=All%20Files&amp;fileSizeLimit=0&amp;fileUploadLimit=1&amp;fileQueueLimit=999&amp;debugEnabled=false&amp;buttonImageURL=%2Fddth%2F&amp;buttonWidth=120&amp;buttonHeight=30&amp;buttonText=&amp;buttonTextTopPadding=0&amp;buttonTextLeftPadding=0&amp;buttonTextStyle=color%3A%20%23000000%3B%20font-size%3A%2016pt%3B&amp;buttonAction=-110&amp;buttonDisabled=false&amp;buttonCursor=-2"></object><div id="file_upload-button" class="uploadify-button " style="height: 30px; line-height: 30px; width: 120px;"><span class="uploadify-button-text">上传图片</span></div></div><div id="file_upload-queue" class="uploadify-queue"></div>
					<input type="hidden" id="order_id" name="order_id" value="144">
					<p style="margin-top:40px;">
						图片地址：<input type="text" id="img_url" name="img_url">
					</p>
					<p>
						<button id="btn_img" type="button" style="width:170px;height:40px;margin-top:5px;background:url(/ddth/public/img/commitImg2.jpg) no-repeat center center / 100% 100%;color:black;font-size:14px;position:relative;color:#000;font-weight:bold;">确认上传</button>
					</p>
				</form>
			</center>

		</div>
	</div>
<script type="text/javascript">

$(function(){
	//显示隐藏
	$('.btn_chakan').click(function () {
		var self = this;
		$('#cha').show(function(){
			var json = $(self).data('json');
			$(this).find('.user_account').text(json['user_account'].substring(0,3) + '***');
			$(this).find('.user_name').text(json['user_name']);
			$(this).find('.mobile').text(json['mobile']);
			$(this).find('.zfb_account').text(json['zfb_account']);
			$(this).find('.wx_id').text(json['wx_id']);
			$(this).find('.bank_card').text(json['bank_card']);
			$(this).find('.money').text(json['money']);
			$(this).find('.hz_time').text(function(){
				var intObj = parseInt(json['hz_time']);
				if(intObj > 0){
					var dateObj = new Date(intObj * 1000);
					var year = dateObj.getFullYear();
					var month = dateObj.getMonth() + 1;
					var day = dateObj.getDate();
					var hour = dateObj.getHours() - 6;
					var minute = dateObj.getMinutes();
					var second = dateObj.getSeconds();
					month = (month >= 10 ? month : '0' + month)
					day = (day >= 10 ? day : '0' + day)
					hour = (hour >= 10 ? hour : '0' + hour)
					minute = (minute >= 10 ? minute : '0' + minute)
					second = (second >= 10 ? second : '0' + second)
					return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
				}else{
					return '';
				}
			});
			$(this).find('.up_user_name').text(json['up_user_name']);
			$(this).find('.up_mobile').text(json['up_mobile']);
		});
	})
	$('#cha').click(function () {
		$(this).hide();
	});
	$('#btn_img').on('mousedown',function(){
		$('#btn_img').css('top','3');
	})
	$('#btn_img').on('mouseup',function(){
		$('#btn_img').css('top','0');
	})
	$('.js-tishi').on('click',function(){
		$('.js-tishi').css('display','none');
	})
    //var order_id = 0;

    $('.photo').click(function() {
        $('#order_id').val($(this).attr('order_id'));
        $('#code').center();
        $('#goodcover').show();
        $('#code').fadeIn();
    });
    $('#closebt').click(function() {
        $('#code').hide();
        $('#goodcover').hide();
    });
    $('#goodcover').click(function() {
        $('#code').hide();
        $('#goodcover').hide();
    });
    /*var val=$(window).height();
    var codeheight=$("#code").height();
    var topheight=(val-codeheight)/2;
    $('#code').css('top',topheight);*/
    jQuery.fn.center = function(loaded) {
        var obj = this;
        body_width = parseInt($(window).width());
        body_height = parseInt($(window).height());
        block_width = parseInt(obj.width());
        block_height = parseInt(obj.height());

        left_position = parseInt((body_width / 2) - (block_width / 2) + $(window).scrollLeft());
        if (body_width < block_width) {
            left_position = 0 + $(window).scrollLeft();
        };

        top_position = parseInt((body_height / 2) - (block_height / 2) + $(window).scrollTop());
        if (body_height < block_height) {
            top_position = 0 + $(window).scrollTop();
        };

        if (!loaded) {

            obj.css({
                'position': 'absolute'
            });
            obj.css({
                'top': ($(window).height() - $('#code').height()) * 0.5,
                'left': left_position
            });
            $(window).bind('resize', function() {
                obj.center(!loaded);
            });
            $(window).bind('scroll', function() {
                obj.center(!loaded);
            });

        } else {
            obj.stop();
            obj.css({
                'position': 'absolute'
            });
            obj.animate({
                'top': top_position
            }, 200, 'linear');
        }
    }


    //点击
    // $('.photo').on('click', function(event) {

    //     order_id = $(this).attr();

    //     $('.modal').modal('show');
    // });
    $('#btn_img').on('click',  function() {

        if($('#order_id').val() == ''){
			$('.tishi-js').text('参数错误');
          //  alert('参数错误');
            return false;
        }else{
			$('.tishi-js').text('');
		}
        if($('#img_url').val() == ''){
			$('.tishi-js').text('请上传图片');
           // alert('请上传图片');
            return false;
        }else{
			$('.tishi-js').text('');
		}

        $('#imgform').submit();

    });

    $('#file_upload').uploadify({
        //'debug'    :'true',
        //'method'   : 'get',
        'swf'      : '<?=base_url()?>public/uploadify/uploadify.swf',
        'uploader' : '<?php echo site_url('/mobile/offer_help/img_upload') ?>',
        'fileObjName'   :   'userfile',
        'buttonText' : '上传图片',
        'uploadLimit' : 1,
        'onUploadSuccess' : function(file, data, response) {
            if(data == 0){
				$('.js-tishi').css('display','block');
				$('.js-tishi').text('上传失败');
               // alert('上传失败');
                location.reload();
            }else{
                $('#img_url').val(data);
            }
            // html += '<p><a href="upload/'+data+'">'+data+'</a></p>';
            // arr.push(data);
            // $('#file_list').html(html);
            // $('#filejson').val(arr.join());
        },
        'onQueueComplete':function(queueData){
            $('.btn_submit').removeAttr('disabled');
        }
    }); 

    $('#inputt').on('click', function(event) {
        if($('#money').val() == ''){
			$('.js-tishi').css('display','block');
	   $('.js-tishi').text('请输入金额');
           // alert('请输入金额');
            return false;
        }
        $('#myform').submit();
    });

    $('.menu li').on('click',  function(event) {
        var day_num = $(this).html().substring(0,1);
        var url = '<?php echo site_url("offer_help/ajax_update_day_num") ?>';
        var id = $($(this).parent()).attr('olid');
        $.post(url, {day_num: day_num,id:id}, function(d) {
            if(d>0){
				$('.js-tishi').css('display','block');
	   $('.js-tishi').text('选择成功');
               // alert('选择成功');
                location.href='<?php site_url("offer_help") ?>';
            }else{
				$('.js-tishi').css('display','block');
	   $('.js-tishi').text('失败');
               // alert('失败');
            }
        });
        /* Act on the event */
    });

})

//$("#gundong table").delegate('.photo>span','click',function(){
//	$(this).siblings("input").click();
//})
var flage = true
$("#gundong table").delegate('.xuanze','click',function(){
	if($(this).find(".menu").css("display") == 'none'){
	$(this).find(".menu").css({display:"block"})
	}else{
		$(this).find(".menu").css({display:"none"})
	}
})
$("#gundong table").delegate('.buda>b','click',function(){
	$("#msg_box>h6").text('是否拒绝打款');
	url=$(this).attr("href");
	$("#msg_box").show();
});
var sile = true;
$("#gundong table tr .chakan").click(
	function(){
		if(sile == true){
		$(".tishi").css({display:"block"})
			var account=$(".tishi>p:first-child>b").html();
			var phone=$(".tishi>p:nth-child(3)>b").html();
			var zfb=$(".tishi>p:nth-child(4)>b").html();
			$(".tishi>p:first-child>b").html(account.slice(0,2)+"***"+account.slice(5));
			$(".tishi>p:nth-child(3)>b").html(phone.slice(0,2)+"***"+phone.slice(5));
			$(".tishi>p:nth-child(4)>b").html(zfb.slice(0,2)+"***"+zfb.slice(5));
		sile = false
		}else{
			$(".tishi").css({display:"none"})
			sile = true
			}
})
var sile = true


$(".tishi .btn input").click(
	function(){
		$(".tishi").css({display:"none"})
		})

function showBox(){
	var url;
	$("#gundong>table tr").each(function(){
		$(this).find(".dakuan>a").click(function(event){
			event.preventDefault();
			$("#msg_box>h6").text('是否确认打款');
			url=$(this).attr("href");
			$("#msg_box").show();
		});
	});
	$("#msg_box #btn_sk_off").click(function(){
		$("#msg_box").hide();
	});
	$("#msg_box #btn_sk_on").click(function(){
		window.location.href=url;
	});
	
};
showBox();

</script>
<script type="text/javascript">
 
    $(function(){
		var intDiff = parseInt(18000);//倒计时总秒数量
    function timer(intDiff){
        window.setInterval(function(){
            var hour=0,
                minute=0,
                second=0;//时间默认值
            if(intDiff > 0){
                hour = Math.floor(intDiff / (60 * 60));
                minute = Math.floor(intDiff / 60)  - (hour * 60);
                second = Math.floor(intDiff) - (hour * 60 * 60) - (minute * 60);
            }
            if (minute <= 9) minute = '0' + minute;
            if (second <= 9) second = '0' + second;
            $('#hour_show').html(hour+':');
            $('#minute_show').html(minute+':');
            $('#second_show').html(second);
            intDiff--;
        }, 1000);
    }
        timer(intDiff);
		var a = true;
		$('.js-btn').on('click',function(){
			$('.asa').css('display','none');
		})
		$('#zcxy').click(function(){
			var width=parseInt($("body").css("width"));
			var subW=parseInt($(".asa").css("width"));
			$(".asa").css("left",(width-subW-25)/2+"px");
			$('.asa').css('display','block');

		})
		$('#btn_add').on('click', function(event) {
			if($('#money').val() == ''){
				$('.js-tishi').css('display','block');
				$('.js-tishi').text('请输入金额');
				// alert('请输入金额');
				return false;
			}
			if (!$('#jkcheck').is(':checked')) {
				alert('请同意平台协议');
				return false;
			}
			$('#myform').submit();
		});
    });

</script>
<script type="text/javascript">
	//遍历倒计时
	function updateEndTime(){
		$(".settime").each(function(i){
			var lag = this.getAttribute("endTime");//(endTime - time) / 1000; //当前时间和结束时间之间的秒数
			$(this).attr("endTime",lag-1);
			if(lag > 0)
			{
				var time_str = '';
				if(lag > 86400){
					time_str += Math.floor((lag / 3600) / 24)+'天';
					console.log(time_str);
				}
				if(lag >3600){
					time_str += Math.floor((lag / 3600) % 24)+"小时";
					console.log(time_str);
				}
				if(lag > 60)
				{
					time_str += Math.floor((lag / 60) % 60)+"分";
					console.log(time_str);
				}
				if(lag > 0)
				{
					time_str += (Math.floor(lag % 60) >= 10 ? Math.floor(lag % 60) : "0" + Math.floor(lag % 60))+"秒";
					console.log(time_str);
				}

				$(this).html(time_str);
			}
			else{
				$(this).removeClass("settime");
				$(this).html("已过期");
			}
		});
		setTimeout("updateEndTime()",1000);
	}
	$(function(){
		updateEndTime();
	});
</script>
<?php echo $foot; ?>